Plex.Lib.JS.load('UI.Button.Core');
Plex.Lib.CSS.load('UI.Button.Small_Text');

Plex.UI.Button.Small_Text = function()
{
	Plex.S$.extend(this,Plex.UI.Button.Core)
	
	var self = this;
	this.type='Small_Text';

	//Create
	this.el={};
	this.el.table = new Element('table',{
		'class':'Small_Text',
		'cellSpacing':'0',
		'cellPadding':'0',
		'border':'0',
		'events':{
			'click':function(){
				self.onClick();
			}
		}
	})
	
	this.el.row = new Element('tr').injectInside(this.el.table);
	this.el.leftCol = new Element('td',{'class':'left'}).injectInside(this.el.row);
	this.el.middleCol = new Element('td',{'class':'body'}).injectInside(this.el.row);
	this.el.rightCol = new Element('td',{'class':'right'}).injectInside(this.el.row);
	
	this.setTitle = function(newTitle)
	{
		this.title = newTitle;
		this.el.middleCol.setText(newTitle);
	}
	
	this.moveTo = function(parent)
	{
		self.el.table.injectInside(parent);
	}
	
	this.object = this.el.table;
	
	return this;
}
